<template>
  <div>
      <detail-dialog v-model="detailDialog.visible" :params="detailDialog.data" :type="detailDialog.type"></detail-dialog>
  </div>
</template>

<script>

import DetailDialog from './components/DetailDialog.vue'
export default {
  name: 'DownPurchaseList',
  components: { DetailDialog },
  data() {
      return {
          detailDialog: {
              visible: false,
              data: {},
          },
          
      }
  },
  watch: {
      '$route': {
          handler(val) {        
              this.showDetailDialog({purchase_number : val.query.purchase_number}, val.query.type)
          },
          immediate: true
      }
  },
   created() {
      
  },
  methods: {
 
      showDetailDialog(row, type) {
          this.detailDialog.visible = true
          this.detailDialog.data = row
          this.detailDialog.type = type
      },
      
  },
}
</script>

